import request from '~/utils/resquest'

//  井盖-列表
export const manholeListGet = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/manhole/list', method: 'GET', params })
}

//  井盖-删除
export const manholeRemovePost = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/manhole/remove', method: 'POST', params })
}

//  井盖-导出
export const manholeExportGet = <T>(payload: T) =>
  request({
    url: '/api/gxsaas-assets/manhole/export',
    method: 'GET',
    responseType: 'blob',
    ...payload
  })

//  井盖-模版下载
export const manholeExportTemplateGet = <T>(payload: T) =>
  request({
    url: '/api/gxsaas-assets/manhole/export-template',
    method: 'GET',
    responseType: 'blob',
    ...payload
  })

// 井盖-导入
export const manholeImportExcelGet = <T>(params: T) =>
  request({
    url: '/api/gxsaas-assets/manhole/import-excel',
    method: 'post',
    data: params
  })

//  井盖-型号
export const manholeModelGet = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/model/getManholeModel', method: 'GET', params })
}

//  井盖-详情
export const manholeViewGet = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/manhole/view', method: 'GET', params })
}

//  井盖-新增
export const manholeAddPost = <T>(data: T) => {
  return request({ url: '/api/gxsaas-assets/manhole/add', method: 'POST', data })
}

//  井盖-修改
export const manholeUpdatePost = <T>(data: T) => {
  return request({ url: '/api/gxsaas-assets/manhole/update', method: 'POST', data })
}
